<template>
<el-row :gutter="20">
  <el-col :span="20" :offset="2">
      <el-form ref="form" :model="form" >
    <el-form-item label="申请人：">
       <el-input v-model="getUserName" readonly="readonly"/>
    </el-form-item>
    <el-form-item label="出差目的：">
        <el-input v-model="form.purpose" readonly="readonly"/>
    </el-form-item>
       <el-form-item label="计划出差日期：">
        <el-input v-model="getPlanDate" readonly="readonly"/>
    </el-form-item>
    <el-form-item label="计划出差天数：">
        <el-input v-model="form.days" readonly="readonly"/>
    </el-form-item>
    <el-form-item label="预计金额：">
        <el-input v-model="form.money" readonly="readonly"/>
    </el-form-item>
    <el-form-item label="行程计划：">
         <el-input type="textarea" v-model="form.travelPlan"  readonly="readonly"/>
    </el-form-item>
        <el-form-item label="内容计划：">
         <el-input type="textarea" v-model="form.contentPlan" readonly="readonly"/>
    </el-form-item>
</el-form>
    </el-col>
</el-row>

</template>
<script>
export default {
    props:["id"],
    data(){
        return {
            form:{systemUser:{},planDate:"0000-00-00"}
        }
    }
    ,created(){
         this.$tool.axios("/audit/travleAudit",
                {id: this.id},
                (response )=>{this.form=response.data} //请求成功返回的数据
                )
    }
    ,computed:{
        getPlanDate(){
                return this.form.planDate.substring(0,9)
        },
         getUserName(){
                console.dir(this.form)
                return this.form.systemUser.name
         }
    }
}
</script>
<style scoped>
.el-textarea__inner  {
    height:"80px";
}
.el-form-item__label {
    width:"150px" !important;
}
.el-row {
    width: 98%;
}
</style>